<div class="content-section implementation GridDemo clearfixes">
  <div class="mysearch">
    <ng-container *ngFor="let tab of tabs;let i = index">
      <button pButton type="button"  label="{{tab.label}}" (click)="changeTab(i)"></button>
    </ng-container>
  </div>

  <ng-container [ngSwitch]= tabIndex>
    <div class="contentInfo" *ngSwitchCase="0" >
      <form class="form-horizontal storage"   >
        <p-panel >
          <p-header>
            <div class="ui-helper-clearfix">
              <span class="ui-panel-title" style="font-size:16px;display:inline-block;margin-top:2px"></span>
              <button class="save"  pButton type="button"  label="返回" (click)="goBack()"  > </button>
            </div>
          </p-header>
          <div class="ui-grid ui-grid-responsive ui-grid-pad ui-fluid" style="margin: 10px 0px">

            <div class="ui-g margin-bottom-1vw">
              <div class="ui-g-6 ui-md-2 ui-lg-1 ui-padding-10px text-right">
                <label >上架单号:</label>
              </div>
              <div class="ui-g-6 ui-md-6 ui-lg-4">
                <input    name="sid"   type="text" pInputText   placeholder=""  readonly [(ngModel)]="detailData['sid']">
              </div>
              <div class="ui-g-6 ui-md-6 ui-lg-3 text-right">
                <label >状态:</label>
              </div>
              <div class="ui-g-6 ui-md-6 ui-lg-4">
                <input   name="status"   type="text" pInputText   placeholder=""  readonly [(ngModel)]="detailData.status">

              </div>
            </div>
            <div class="ui-g margin-bottom-1vw">
              <div class="ui-g-6 ui-md-2 ui-lg-1 text-right">
                <label >申请人:</label>
              </div>
              <div class="ui-g-6 ui-md-6 ui-lg-4">
                <input   name="creator"   type="text" pInputText   placeholder=""  readonly [(ngModel)]="detailData.applicant">

              </div>
              <div class="ui-g-6 ui-md-6 ui-lg-3 text-right">
                <label >申请人组织:</label>
              </div>
              <div class="ui-g-6 ui-md-6 ui-lg-4">
                <input   name="creator_org"   type="text" pInputText   placeholder=""  readonly [(ngModel)]="detailData.applicant_org">
              </div>
            </div>
            <div class="ui-g margin-bottom-1vw">
              <div class="ui-g-6 ui-md-6 ui-lg-1 ui-padding-10px text-right">
                <label >上架类型:</label>
              </div>
              <div class="ui-g-6 ui-md-6 ui-lg-4">
                <input   name="assetshelve_type"   type="text" pInputText   placeholder=""  readonly [(ngModel)]="detailData.assetshelve_type">
              </div>
              <div class="ui-g-6 ui-md-6 ui-lg-3 text-right">
                <label >部门审批人:</label>
              </div>

              <div class="ui-g-6 ui-md-6 ui-lg-4">
                <input   name="org_approver"   type="text" pInputText   placeholder=""  readonly [(ngModel)]="detailData.approve">
              </div>
            </div>
            <div class="ui-g margin-bottom-1vw" >
              <div class="ui-g-6 ui-md-6 ui-lg-1 text-right">
                <label ><span></span>计划上架时间:</label>
              </div>
              <div class="ui-g-6 ui-md-6 ui-lg-4">
                <input   name="assetshelve_plantime_begin"   type="text" pInputText   placeholder=""  readonly [(ngModel)]="detailData.assetshelve_plantime_begin">
              </div>
              <div class="ui-g-6 ui-md-6 ui-lg-3 text-right ">
                <label ><span></span>计划完成时间:</label>
              </div>
              <div class="ui-g-6 ui-md-6 ui-lg-4">
                <input   name="assetshelve_plantime_end"   type="text" pInputText   placeholder=""  readonly [(ngModel)]="detailData.assetshelve_plantime_end">
              </div>
            </div>
            <div class="ui-g margin-bottom-1vw">
              <div class="ui-g-6 ui-md-6 ui-lg-1 ui-padding-10px text-right">
                <label >预计使用周期:</label>
              </div>
              <div class="ui-g-6 ui-md-6 ui-lg-4">
                <input   name="usage_time"   type="text" pInputText   placeholder=""  readonly [(ngModel)]="detailData.usage_time">
              </div>
              <div class="ui-g-6 ui-md-6 ui-lg-3 text-right">
                <label ><span></span>计划上架区域:</label>
              </div>
              <div class="ui-g-6 ui-md-6 ui-lg-4">
                <input   name="assetshelve_location"   type="text" pInputText   placeholder=""  readonly [(ngModel)]="detailData.assetshelve_location">
              </div>
            </div>
            <div class="ui-g margin-bottom-1vw">
              <div class="ui-g-6 ui-md-6 ui-lg-1 text-right">
                <label ><span></span>关联预占单号:</label>
              </div>
              <div class="ui-g-6 ui-md-6 ui-lg-4">
                <input   name="preoccupied_sid"   type="text" pInputText   placeholder=""  readonly [(ngModel)]="detailData.preoccupied_sid">
              </div>
              <div class="ui-g-6 ui-md-6 ui-lg-3 ui-padding-10px text-right">
                <label >供应电极:</label>
              </div>
              <div class="ui-g-6 ui-md-6 ui-lg-4">
                <input   name="power_level"   type="text" pInputText   placeholder=""  readonly [(ngModel)]="detailData.power_level">
              </div>
            </div>
            <div class="ui-g margin-bottom-1vw">
              <div class="ui-g-6 ui-md-6 ui-lg-1 text-right">
                <label ><span></span>上架原因:</label>
              </div>
              <div class="ui-g-6 ui-md-6 ui-lg-11">
                <textarea name="assetshelve_reason"  pInputTextarea type="text" [(ngModel)]="detailData.assetshelve_reason" ></textarea>
              </div>
            </div>
            <div class="ui-grid-row margin-bottom-1vw"  *ngIf="detailData.status !== '新建'">
              <div class="ui-grid-col-1 ui-padding-10px text-right">
                <label >下一审批角色:</label>
              </div>
              <div class="ui-grid-col-4">
                <input   name="next_approver_org"   type="text" pInputText   placeholder=""  readonly [(ngModel)]="detailData.next_approve_org">
              </div>
              <div class="ui-grid-col-3 text-right">
                <label >下一审批人:</label>
              </div>
              <div class="ui-grid-col-4">
                <input   name="next_approver"   type="text" pInputText   placeholder=""  readonly [(ngModel)]="detailData.next_approve">
              </div>
            </div>
            <div class="ui-grid-row margin-bottom-1vw" *ngIf="detailData.status !== '新建'">
              <div class="ui-grid-col-1 text-right">
                <label ><span></span>执行人组织:</label>
              </div>
              <div class="ui-grid-col-4">
                <input   name="executor_org"   type="text" pInputText   placeholder=""  readonly [(ngModel)]="detailData.executor_org">
              </div>
              <div class="ui-grid-col-3 ui-padding-10px text-right">
                <label >上架执行人:</label>
              </div>
              <div class="ui-grid-col-4">
                <input   name="executor"   type="text" pInputText   placeholder=""  readonly [(ngModel)]="detailData.executor">
              </div>
            </div>
            <div class="ui-g margin-bottom-1vw" *ngIf="detailData.status ==='已完成'">
              <div class="ui-g-6 ui-md-6 ui-lg-1 text-right">
                <label ><span></span>复核意见:</label>
              </div>
              <div class="ui-g-6 ui-md-6 ui-lg-11">
                <textarea name="auditor_remarks"  pInputTextarea type="text" [(ngModel)]="detailData.auditor_remarks" ></textarea>
              </div>
            </div>
          </div>
        </p-panel>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-2">
          </div>
        </div>
        <label></label>
        <div class="" >
          <div class="ui-g">
            <div class="ui-g-6 ui-md-6 ui-lg-8 text-right" ></div>
            <div class="ui-g-6 ui-md-6 ui-lg-4 text-right" >
            </div>
          </div>
        </div>
        <label><span></span>设备列表</label>
        <p-dataTable [value]="devices"  [lazy]="true" [rows]="10" [paginator]="true"  (onLazyLoad)="loadCarsLazy($event)"
                     [totalRecords]="totalRecords"  [(selection)]="selectConstructions" [editable]="true"   [rowsPerPageOptions]="[5,10,20]">
          <p-column [style]="{'width':'38px'}" selectionMode="multiple"></p-column>
          <p-column  field="ano" header="设备编号" [sortable]="true" >
            <ng-template let-data="rowData" pTemplate="body" let-i="rowIndex">
              <span (click)="viewOption(data)" class="curser">{{data.ano}}</span>
            </ng-template>
          </p-column>
          <p-column  *ngFor="let col of cols" field="{{col.field}}" header="{{col.header}}" [editable]="col.editable" [sortable]="true"></p-column>
          <p-column  field="data" header="上架位置" [sortable]="true" >
            <ng-template let-data="rowData" pTemplate="body" let-i="rowIndex">
              <span>{{data['timeGroup']}}</span>
            </ng-template>
          </p-column>
          <ng-template pTemplate="emptymessage" >
            当前没有数据
          </ng-template>

        </p-dataTable>
      </form>
    </div>
    <div class="associatedEquipment" *ngSwitchCase="1" >
      <p-dataTable [value]="detailData.approval_process"  [lazy]="true" [rows]="10" [paginator]="true"
                   [totalRecords]="totalRecords"  [(selection)]="selectInsepections" >
        <!--<p-column [style]="{'width':'38px'}" selectionMode="multiple"></p-column>-->
        <p-column  *ngFor="let col of asscitedCols" field="{{col.field}}" header="{{col.header}}"></p-column>
        <ng-template pTemplate="emptymessage">
          当前没有数据
        </ng-template>
      </p-dataTable>
    </div>
    <div class="Operationlog" *ngSwitchCase="2">
      <p-dataTable [value]="detailData.operations"  [lazy]="true" [rows]="10" [paginator]="true"
                   [totalRecords]="totalRecords"  [(selection)]="selectInsepections" >
        <!--<p-column [style]="{'width':'38px'}" selectionMode="multiple"></p-column>-->
        <p-column  *ngFor="let col of OperationLogCols" field="{{col.field}}" header="{{col.header}}"></p-column>
        <ng-template pTemplate="emptymessage">
          当前没有数据
        </ng-template>
      </p-dataTable>
    </div>
  </ng-container>
</div>
<app-asset-detail
  *ngIf="showViewDetailMask"
  [currentAsset]="tempAsset"
  (closeDetailMask)="closeViewDetail($event)">
  ></app-asset-detail>

